#include "deviceinfodialog.h"
#include "ui_deviceinfodialog.h"

DeviceInfoDialog::DeviceInfoDialog(QWidget *parent) :
    QWidget(parent),
    ui(new Ui::DeviceInfoDialog)
{
    ui->setupUi(this);
}

DeviceInfoDialog::~DeviceInfoDialog()
{
    delete ui;
}

void DeviceInfoDialog::on_commitButton_clicked()
{
    //发射信号，emit
    QString name = ui->nameLineEdit->text();
    QString id = ui->idLineEdit->text();
    QString time = ui->timeLineEdit->text();

    emit sentDeviceInfoDialog(name,time,id);
    //单击提交按钮返回主窗口，将文本框数据传递给主窗口
    this->close();
}
